﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="_demo_Welcome" %>

<% Response.AddHeader("Pragma", "no-cache"); %>
<% Response.AddHeader("Cache-Control", "no-cache"); %>
<% Response.AddHeader("Cache-Control", "no-store"); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Welcome Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="../Scripts/jquery-1.6.1.js"></script>
    <script type="text/javascript" src="../Scripts/common.js"></script>
    <%-- <script type="text/javascript" src="../Scripts/formsScript/welcome.js"></script>--%>
    <script type="text/javascript" src="../Scripts/ui/jquery.ui.datepicker.js"></script>
    <%--for tab--%>
    <link type="text/css" rel="stylesheet" href="../css/ui.jqgrid.css" />
    <link type="text/css" rel="stylesheet" href="../css/ui.multiselect.css" />
    <link type="text/css" rel="stylesheet" href="../themes/redmond/jquery-ui-1.8.1.custom.css" />
    <script type="text/javascript" src="../Scripts/ui/jquery-ui-1.8.16.custom.js"></script>
    <%--    <link type="text/css" rel="stylesheet" href="../themes/ui-lightness/jquery-ui-1.8.16.custom.css" />--%>
    <%--   <link type="text/css" href="../themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />--%>
    <script type="text/javascript" src="../Scripts/ui/jquery.ui.core.js"></script>
    <script type="text/javascript" src="../Scripts/ui/jquery.ui.tabs.js"></script>
    <%-- <link type="text/css" href="../css/demos.css" rel="stylesheet" />--%>
    <%--end for tab--%>
    <script type="text/javascript" src="../Scripts/ui/jquery-ui.min.js"></script>
    <script type="text/javascript" src="../Scripts/ui/ui.tabs.closable.js"></script>
    <%-- <link type="text/css" rel="stylesheet" href="../themes/base/jquery-ui.css" />--%>
    <script type="text/javascript" src="../Scripts/jquery.cookie.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.hotkeys.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.jstree.js"></script>
    <%-- <script type="text/javascript" src="../Scripts/common.js"></script>--%>
    <%-- <script type="text/javascript" src="../Scripts/jquery.alerts.js"></script>
    <link rel="stylesheet" type="text/css" href="../Style/jquery.alerts.css">--%>
    <script type="text/javascript" src="../Scripts/Tree.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/welcome.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/Reports.js"></script>
    <link rel="stylesheet" type="text/css" href="../Style/common.css">
    <link type="text/css" rel="stylesheet" href="../Style/!style1.css" />
    <link type="text/css" rel="stylesheet" href="../Style/!style2.css" />
    <link type="text/css" rel="stylesheet" href="../themes/default/style.css" />
    <link rel="stylesheet" type="text/css" href="../Style/superfish.css" media="screen">
    <script type="text/javascript" src="../Scripts/!script.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.tmpl.js"></script>
    <script type="text/javascript" src="../Scripts/hoverIntent.js"></script>
    <script type="text/javascript" src="../Scripts/superfish.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/master.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/config.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/reports.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/dashboard.js"></script>
    <%--jqgrid files--%>
    <%--   <link type="text/css" rel="stylesheet" href="../css/ui.jqgrid.css" />
    <link type="text/css" rel="stylesheet" href="../css/ui.multiselect.css" />
    <link type="text/css" rel="stylesheet" href="../themes/redmond/jquery-ui-1.8.1.custom.css" />--%>
    <link type="text/css" href="../css/demos.css" rel="stylesheet" />
    <script src="../Scripts/jquery.layout-latest.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.locale-en.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jqModal.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.base.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.common.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.formedit.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.inlinedit.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.jqueryui.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jquery.contextmenu.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jquery.tablednd.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.filter.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.custom.js" type="text/javascript"></script>
    <%--   <script src="../Scripts/jqgrid/grid.formedit.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.inlinedit.js" type="text/javascript"></script>--%>
    <script src="../Scripts/jqgrid/jqDnR.js" type="text/javascript"></script>
    <script src="../Scripts/simpleresizabletables.js" type="text/javascript"></script>
    <%--   <script src= "../Scripts/json2.js" type="text/javascript"></script>--%>
    <script type="text/javascript" src="../Scripts/jqgrid/jquery.searchFilter.js"></script>
    <%--     jquery-ui-1.8.1.custom.css--%>
    <%--jqgrid files--%>
    <%--graph files--%>
    <script src="../Scripts/graph/jquery.jqplot.min.js" type="text/javascript" language="javascript"></script>
    <link type="text/css" href="../Scripts/graph/jquery.jqplot.css" rel="stylesheet" />
    <script src="../Scripts/graph/jqplot.pieRenderer.js" type="text/javascript" language="javascript"></script>
    <script src="../Scripts/graph/jqplot.donutRenderer.min.js" type="text/javascript"
        language="javascript"></script>
    <script type="text/javascript" src="../Scripts/graph/jqplot.barRenderer.min.js"></script>
    <script type="text/javascript" src="../Scripts/graph/jqplot.categoryAxisRenderer.min.js"></script>
    <script type="text/javascript" src="../Scripts/graph/jqplot.pointLabels.min.js"></script>
    <script type="text/javascript" src="../Scripts/graph/jqplot.canvasTextRenderer.min.js"></script>
    <script type="text/javascript" src="../Scripts/graph/jqplot.canvasAxisTickRenderer.min.js"></script>
    <script type="text/javascript" src="../Scripts/graph/excanvas.js"></script>
    <%-- graph files--%>

    <%-- jsPlumb files--%>
    <%-- <script type="text/javascript" src="../Scripts/jsPlumb/jquery.jsPlumb-1.3.9-all-min.js"></script>--%>
    <script type="text/javascript" src="../Scripts/jsPlumb/jquery.jsPlumb-1.3.9-all.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/demoGraph.js"></script>
    <%-- jsPlumb files--%>
    <script type="text/javascript">
        jQuery.extend($.fn.fmatter, {
            linkFmatter: function (cellvalue, options, rowdata) {
                // debugger;
                return "<a href='#' onclick='javascript:DisplayImpProcess(\"" + options.rowId + "\",this);'>select</a>";
            }
        });

        jQuery.extend($.fn.fmatter, {
            linkShowFmatter: function (cellvalue, options, rowdata) {
                // debugger;
                return "<a href='#' onclick='javascript:DisplayDetail(\"" + options.rowId + "\",this);'>detail</a>";
            }
        });      
 
    </script>
    <script id="tmplAttr" type="text/x-jquery-tmpl">           
        <tr><td colspan="2" width="100%" align="center"><img src=${ImageUrl} class="nodetypeimage"/><span><b>${NodeName}</b></span><span> <b>[ ${NodeTypeName} ], ${StartDate}-${EndDate}</b></span></td></tr>         
        <tr><td nowrap="nowrap"><span><b>Unique Id</b></span></td><td><span>${UniqueId}</span></td></tr>           
        
        {{each NodeAttributes}}                
            <tr>
            <td nowrap="nowrap">
                <span >${dispalyName}<span>
            </td>
            <td>
                 {{if control_type == 'textbox'}} 
                      {{if datatype == 'VARCHAR'}} 
                         <input type="text" class="attrText" colName="${name}" value="${value}" datatype="${datatype}" is_req="${is_req}" maxlength="${prec}"/>
                      {{else  datatype == 'NUMBER'}} 
                           <input type="text" class="attrText" colName="${name}" value="${value}" datatype="${datatype}" is_req="${is_req}" maxlength="${prec}" />
                      {{/if}} 
                 {{else control_type == 'dropdown'}} 
                     <select class="attrText" colName="${name}" style="width: 145px;" control_type="${control_type}" is_req="${is_req}">
                     {{each NodeAttrDropVal}} 
                            {{if selected == 'true' }}                                   
                                     <option value="${optvalue}" selected="true">${text}</option>   
                             {{else}}
                                     <option value="${optvalue}" >${text}</option>   
                             {{/if}} 
                     {{/each}}
                    </select>
                 {{else control_type == 'calender'}} 
                    <input type="text" class="attrText" colName="${name}" value="${value}" datatype="${datatype}" is_req="${is_req}" control_type="${control_type}" />
                 {{/if}} 

                 {{if is_req == 'True'}} 
                     <font style="font-weight: bold; color: #FF0000; vertical-align: bottom;">*</font>
                 {{/if}} 

            </td>
            </tr>        
        {{/each}}

    </script>
    <script id="tmpldim" type="text/x-jquery-tmpl"> 
     <tr>
        {{each dimUpperHeading}} 
           {{if colspan > 0 }} 
                <th nowrap="nowrap" class="master_th_upper" colspan=${colspan}>${text} </th>
           {{/if}} 
        {{/each}}
     </tr> 

     <tr id="dimhead">
        {{each dimheading}}            
            <th nowrap="nowrap" class="master_th" id=${id} value=${val} colspan=${colspan}>${text}</th>
        {{/each}}
     </tr> 
       
     {{each DimMFields}}                  
         <tr id=tr${$index}>
            <td nowrap="nowrap" class="master_td">
                <span >${name}<span>
            </td>
            <td class="master_td" id=m${$index} nowrap="nowrap" style="border-right: 0px;">
                 {{if control_type == 'textbox'}} 
                      {{if datatype == 'varchar'}} 
                         <input id=input_m${$index}  type="text" class="dimText" colName="${name}" value="${value}" datatype="${datatype}" is_req="${is_req}" maxlength="${prec}" size="${size}" readonly="readonly"/>
                      {{else  datatype == 'number' || datatype == 'int' || datatype == 'decimal' || datatype == 'bigint' || datatype == 'datetime' || datatype == 'date'}} 
                           <input id=input_m${$index} type="text" class="dimText" colName="${name}" value="${value}" datatype="${datatype}" is_req="${is_req}" maxlength="${prec}" size="${size}" readonly="readonly"/>
                      {{/if}} 
                 {{else control_type == 'dropdown'}} 
                     <select class="dimText" colName="${name}" style="width: 145px;" control_type="${control_type}" is_req="${is_req}">
                     {{each NodeAttrDropItem}} 
                            {{if selected == 'true' }}                                   
                                     <option value="${optvalue}" selected="true">${text}</option>   
                             {{else}}
                                     <option value="${optvalue}" >${text}</option>   
                             {{/if}} 
                     {{/each}}
                    </select>
                 {{else control_type == 'calender'}} 
                    <input type="text" class="dimText" colName="${name}" value="${value}" datatype="${datatype}" is_req="${is_req}" control_type="${control_type}" />
                 {{else control_type == 'textarea'}} 
                     <textarea rows="2" colName="${name}" cols="20" multiline="true" class="dimText" datatype="${datatype}" is_req="${is_req}" control_type="${control_type}">${value}</textarea>
                 {{/if}} 

                 {{if is_req == 'True'}} 
                     <font class="red_asterick">*</font>
                 {{/if}} 
            </td>

            <td nowrap="nowrap" class="master_td" style="width:45px;vertical-align: top;" >
                 <table><tr><td>
                 <input type="button" value="Apply" style="height: 23px;margin:5px;width:46px; display:none;" id=btn_${$index} onclick="apply_click(${$index});" class="submit-button" size="${size}"/>
                 </td>
                 <td>
                 <input type="button" value="Clear" style="height: 23px;margin:5px;width:46px;display:none;" id=btnC_${$index} onclick="clear_click(${$index});" class="submit-button" size="${size}"/>        
                 <input id=hidxref_${$index} name=hidxref_${$index} type="hidden" value="${xref_id}" colname="${control_name}" changed="false" data="${value}"/>
                 </td></tr></table>
            </td>

            {{each(i) xrefArr_value}}   
                 {{if bsource == true}} 
                      <td nowrap="nowrap" class="master_td" bgcolor="#FFFFC6" id=xref_${$index}_${i}> 
                            ${value}      
                      </td>
                 {{else bsource == false}} 
                     <td nowrap="nowrap" class="master_td" bgcolor="#FFFFFF" id=xref_${$index}_${i}>
                            ${value}          
                      </td>
                 {{/if}}                
            {{/each}}
            
            {{each grayArr_value}}    
                <td nowrap="nowrap" class="master_td">   
                   ${$value}            
                </td>
            {{/each}}


       {{/each}}
     </tr>   
        
    </script>
    <script id="tmplGraph" type="text/x-jquery-tmpl"> 
       <div id=${rel_col} class="div">
            <p>
               ${show_col}
            </p>
       </div>
    </script>
    <script id="tmplOptions" type="text/x-jquery-tmpl"> 
        <option value=${Value}>${Text}</option>
    </script>
    <script id="tmplListItems" type="text/x-jquery-tmpl">
        <li value=${Value}><a href="#" rel="${Text}" >${Text}</a></li>
    </script>
    <script id="Script1" type="text/x-jquery-tmpl">
        <li class=""><ins>&nbsp;</ins><a rel="${Text}" href="#">${Text}</a></li>
    </script>
    <script id="chkInputs" type="text/x-jquery-tmpl">
        <input type="checkbox" name="chkgrp_col" value=${Value} checked /><span>${Text}</span>
    </script>
    <script id="tmplTableTr" type="text/x-jquery-tmpl"> 
        <tr><td>${colname}</td><td>${colvalue}</td></tr>
    </script>
    <%--    <script id="tmplDynTabs_old" type="text/x-jquery-tmpl">  
        <ul>
            <li><a href='#${dimabbr}ex'>Exist</a></li>
            <li><a href='#${dimabbr}rule'>Rules</a></li>
            <li><a href='#${dimabbr}un'>Un-assigned</a></li>
        </ul>
        <div id="${dimabbr}ex">
          <div style="height:290px">
            <table id="dtgrid${dimabbr}ex" > </table>
            <div id="pg${dimabbr}ex" class="scroll"></div>
          </div>
           <div id="div${dimabbr}ex" align="center"> 
              <input id="btn${dimabbr}_arel"  type="button" style="height: 24px; margin: 5px;" value="add relation" onclick="showAddRelation('${dimabbr}','#dtgrid${dimabbr}ex');" />&nbsp;
              <input id="btn${dimabbr}_rrel"  type="button" style="height: 24px; margin: 5px;" value="remove relation" onclick="remove_rel('${dimabbr}','#dtgrid${dimabbr}ex');"/>&nbsp;
            </div>
        </div>
        <div id="${dimabbr}rule">
        </div>

        <div id="${dimabbr}un">
            <div style="height:290px">
                 <table id="dtgrid${dimabbr}un" > </table>
                 <div id="pg${dimabbr}un" class="scroll" ></div>
            </div>
            <div id="div${dimabbr}un" align="center">                  
                  <input id="btn${dimabbr}_assgn"  type="button" style="height: 24px; margin: 5px;" value="assign" onclick="add_rel('${dimabbr}','#dtgrid${dimabbr}un');"/>&nbsp;
            </div>
        </div>
    </script>--%>
    <script id="tmplDynTabs" type="text/x-jquery-tmpl">  
        <ul>
            <li><a href='#${dimabbr}ex'>Exist</a></li>
            <li><a href='#${dimabbr}rule'>Rules</a></li>            
        </ul>
        <div id="${dimabbr}ex">
          <div style="height:280px" align="center">
            <table id="dtgrid${dimabbr}ex" width="550px"> </table>
            <div id="pg${dimabbr}ex" class="scroll"></div>
          </div>
           <div id="div${dimabbr}ex" align="center"> 
              <input id="btn${dimabbr}_arel"  type="button" style="height: 24px;margin:5px; " value="Add relation" onclick="showAddRelation('${dimabbr}','#dtgrid${dimabbr}ex');" class="submit-button" />&nbsp;
              <input id="btn${dimabbr}_rrel"  type="button" style="height: 24px;margin:5px; " value="Remove relation" onclick="remove_rel('${dimabbr}','#dtgrid${dimabbr}ex');" class="submit-button" />&nbsp;
            </div>
        </div>

        <div id="${dimabbr}rule">
           <label style="color: rgb(46, 110, 158);"><b>Parent's Rule</b></label>
           <div style="height:80px;border: 1px solid #C5DBEC;" id="div_${dimabbr}parent"></div>
           <label style="color: rgb(46, 110, 158);"><b>Current Rule</b></label>
           <div style="height:80px;border: 1px solid #C5DBEC;" id="div_${dimabbr}currule"></div>
           <table id="dtgrid${dimabbr}_rule" > </table>          
           <input id="btn${dimabbr}_rule"  type="button" style="height: 24px;margin-top:10px; " value="Add Rule " onclick="set_rule('${dimabbr}','dtgrid${dimabbr}_rule');" class="submit-button"/>&nbsp;
           <input id="hdn${dimabbr}_obj" name="hdn${dimabbr}_obj" type="hidden" value="" />
        </div> 
             
    </script>
    <script id="tmplDynRpt" type="text/x-jquery-tmpl">  
         <div> 
            <table class="group_table" style="margin:20px 22px;" cellpadding="0" cellspacing="0" border="0">
            <tr>
               <td><b>Dimension Name :</b></td>
               <td>${listname}</td>
            </tr>
            <tr>
               <td><b>Query :</b></td>
               <td>${query}</td>
            </tr>
             <tr>
               <td>
                  <input id="btn${index}_export"  type="button" style="height: 24px; margin: 0px;" class="submit-button" value=" Export to excel " onclick="export_excel('${list_id}','${SourceQuery}','${queryRel}','${dimTableName}','${strcolforData}');"/>&nbsp;
               </td>
               <td>
                 <input id="btn${index}_export"  type="button" style="height: 24px; margin: 0px;" class="submit-button" value=" Export to pdf " onclick="export_pdf('${list_id}','${SourceQuery}','${queryRel}','${dimTableName}','${strcolforData}');"/>&nbsp;
               </td>
            </tr>          
            </table>
            <div align="center">
            <table id="dtgridRptData${index}" cellpadding="0" cellspacing="0"> </table>
            <div id="pgRptData${index}"></div>
            </div>
         </div>
    </script>
    <script id="tmplDynRel" type="text/x-jquery-tmpl">  
         <div align="center" style="margin-top:20px;">
            <div align="center" style="margin: 8px; font-weight: bold;color:#2E6E9E;">Dimension Name: ${list_name}</div>   
            <div align="center" style="margin: 8px; font-weight: bold;color:#E17009;">${strDims}</div>                    
            <table id="${id}-${index}"  style="border-left: 1px solid #2E6E9E; border-top: 1px solid #2E6E9E;">
            </table>
         </div>
    </script>
    <%--  <script id="tmplDynRel" type="text/x-jquery-tmpl">  
         <div align="center" style="margin-top:20px;"> 
            <table id="${id}-${index}"  class="group_table" style="margin:20px 22px;" cellpadding="0" cellspacing="0" border="0">
                <tr style="font-weight:bold;"> <td> Column name </td><td> Column value </td></tr>
              
            </table>
         </div>
    </script>--%>
    <script id="tmplDynMatchRes" type="text/x-jquery-tmpl">  
     <div style="margin-top: 15px;">
         {{if name == 'Match'}} 
            <div align="left" style="margin-left: 25px; margin-bottom: 15px; margin-right: 10px;">
                Select Rule :
                <select style="width: 140px;" id="drp_${name}rule" name="drp_${name}rule"></select>
                <input id="btn_${name}rule" type="button" style="height: 24px; margin-left: 10px;"
                    class="submit-button" value=" Change Rule " onclick="refreshMatchGrid('${name}');" />
            </div>
        {{else name == 'Manual'}}
             <div align="left" style="margin-left: 25px; margin-bottom: 15px; margin-right: 10px;">
                Select Rule :
                <select style="width: 140px;" id="drp_${name}rule" name="drp_${name}rule"></select>
                <input id="btn_${name}rule" type="button" style="height: 24px; margin-left: 10px;"
                    class="submit-button" value=" Change Rule " onclick="refreshMatchGrid('${name}');" />
            </div>    
        {{/if}}


        <table id="dtgrid${name}" cellpadding="0" cellspacing="0"></table>
        <div id="pg${name}"></div>

        <div align="left" style="margin-left: 25px; margin-bottom: 15px; margin-right: 10px;">
           
              {{if name == 'Match'}} 
                    <input type="button" id="MSubmit_${name}Apply" style="margin-top: 10px;" value="Apply Rule"
                    class="submit-button" onclick="${name}Apply();" />&nbsp;
                    <input type="button" id="MSubmit_${name}Send" style="margin-top: 10px;" value="Send to Un-Match"
                            class="submit-button" onclick="SendToUnMatch('${name}');" />
              {{else name == 'Manual'}}  
                   <input type="button" id="MSubmit_${name}Apply" style="margin-top: 10px;" value="Apply Rule"
                    class="submit-button" onclick="${name}Apply();" />&nbsp;
                    <input type="button" id="MSubmit_${name}Send" style="margin-top: 10px;" value="Send to Un-Match"
                            class="submit-button" onclick="SendToUnMatch('${name}');" />
              {{else name == 'UnMatch'}}
                 <input type="button" id="MSubmit_${name}Apply" style="margin-top: 10px;" value="Save To Master"
                    class="submit-button" onclick="${name}Apply();" />&nbsp;
                 <input type="button" id="MSubmit_${name}Discard" style="margin-top: 10px;" value="Discard"
                            class="submit-button" onclick="Discard();" />

              {{/if}}          
        </div>
    </div>
    </script>

    <script type="text/javascript">

        $(document).ready(function () {
            //debugger;

            ////tab 0 "Dashboard" scripts 
            var dim_data = BindCombo("bind_master", "", "drp_mstdash", "master", true);
            $("#drp_mstdash option:not([value=4],[value=5],[value=''])").remove();

            $("#drp_mstdash").change(function () {
                // debugger;             
                ShowGraph(true);
                //loadGridRptdata(dimtable_name, list_id);
            });

            //            $("#drp_chart").change(function () {
            //                ShowGraph(false);
            //            });

            $("input[name='radiogrp_chart']").change(function () {
                ShowGraph(false);
            });

            $("input[name='radiogrp_chfield']").change(function () {
                ShowGraph(true);
            });

            //debugger;
            $(':radio').css("vertical-align", "text-bottom");
            ///end of dashboard tab

            //tab 1 "Grouping" scripts 
            $("ul.sf-menu").hide();

            var todate = getCurrDate();
            $('#txt_date').val(todate);
            $("input[value='todate']").attr('checked', true);
            disabledate();

            var hier_data = BindCombo("bind_hierarchy", "", "drp_hier", "hier", true);

            //debugger;
            $('#txt_date').datepicker({
                maxDate: "-1D",
                changeMonth: true,
                changeYear: true,
                showOn: "button",
                buttonImage: "../Images/calendar.gif",
                buttonImageOnly: true
                //minDate: new Date(2010, 1-1, 1)   
            });

            $("#txt_date").datepicker('disable');
            //vertically align image of date-picker
            $("img.ui-datepicker-trigger").css("vertical-align", "middle");

            $("#tbl_Buttons").hide();

            //hier dropdown click
            $("#drp_hier").change(function () {
                //debugger;
                ClearScreen();
                BindCombo("bind_version", $(this).val(), "drp_ver", "hier", false);
            });

//            //ver dropdown click
//            $("#drp_ver").change(function () {
//                debugger;

//                var ver_id = $("#drp_ver").val();
//                if (ver_id != "") {
//                    var startDate = $('#drp_ver option:selected').attr("start_date");
//                    var endDate = $('#drp_ver option:selected').attr("end_date");
//                    var todate = Date.parse(getCurrDate());
//                    if ( Date.parse(endDate) < todate ||  Date.parse(startDate) > todate) {
//                        var $radios = $('input:radio[name=sdate]');
//                        //if ($radios.is(':checked') === false) {
//                        $radios.filter('[value=histdate]').attr('checked', true);
//                        $("#txt_date").datepicker({ minDate: startDate, maxDate: endDate}); 
//                        
//                    }
//                    // Date.parse(new Date())
//                }
//            });

            $("#drp_ver").change(function () {
                ClearScreen();

            });

            //submit button click
            $("#submit").click(function () {
                submitClick();
            });

            //attribute save button click
            $("#btn_Save").click(function () {
                saveAttributes();
            });
            //end of tab1 
            //debugger;

            //tab master scripts
            var mst_data = BindCombo("bind_master", "", "drp_mst", "master", true);

            //submit button click
            $("#MSubmit_M").click(function () {
                //debugger;
                dimtable_name = $("#drp_mst option:selected").data("TableName");
                if (list_id != $("#drp_mst").val()) {
                    list_id = $("#drp_mst").val();
                    // hide source table
                    $("#M_DimMast").hide();
                    //hide apply button
                    $("#MSubmit_Apply").hide();
                    //hide relation div
                    $("#divRel").hide();
                    //remove content from graph tab
                    ClearGraphTab();
                    loadGriddata();
                }
                else {
                    return false;
                }
            });

            //show button click
            $("#MSubmit_Show").click(function () {
                loadDimData();
                // $("#MSubmit_Apply").css('display', 'block');
            });

            //Relation button click
            $("#MSubmit_Rel").click(function () {
                // - original method
                //loadDimRelData();
                ShowRelData();
            });

            $("#btn_del").click(function () {
                ////debugger;
                var gr = jQuery("#dataGrid").jqGrid('getGridParam', 'selrow');
                if (gr != null) jQuery("#dataGrid").jqGrid('delGridRow', gr,
                {
                    reloadAfterSubmit: true
                });
                else alert("Please Select Row to delete!");
            });

            $("#btn_add").click(function () {
                // //debugger;
                jQuery("#dataGrid").jqGrid('editGridRow', "new", { height: 280, reloadAfterSubmit: false });
            });

            $("#btn_edit").click(function () {
                // //debugger;
                jQuery("#dataGrid").jqGrid('editGridRow', { height: 280, reloadAfterSubmit: true });
            });

            //table of master double click
            $('#M_DimMast').dblclick(function (event, object) {
                //debugger;
                tableMaster_dblClick(event, object);
            });

            // debugger;
            $("#MSubmit_Show").hide();
            $("#MSubmit_Rel").hide();
            $("#MSubmit_Apply").hide();

            //dimension apply button click
            $("#MSubmit_Apply").click(function () {
                ////debugger;
                saveMasterData();
            });

            //on change of dimension combo 
            $("#drp_mstM").change(function () {
                //debugger;
                importDimensionChange();
            });

            //$("#relError").hide();
            $("#relMstError").hide();
            $("#editSrcError").hide();

            ////////////////////////////////////////Dimension-Import///////////////////////////////////////////////////////////
            //dimension apply button click
            $("#MSubmit_Import").click(function () {
                //debugger;
                ImportData(); // ApplyRule();
            });

            //hide on load execute rule button
            $("#MSubmit_matchRule").hide();
            //MSubmit_matchRule
            $("#MSubmit_matchRule").click(function () {
                //debugger;               
                //if ($('input:radio[name=radiogrp_imp]:checked').val() == "new") {
                matchRule();
                //}
            });


            //            //MSubmit_matchApply click
            //            $("#MSubmit_matchApply").click(function () {
            //              //debugger;
            //                matchApply();
            //            });

            //            //MSubmit_matchApply click
            //            $("#MSubmit_unmatchApply").click(function () {
            //              //debugger;
            //                unMatchApply();
            //            });


            //hide match-rule button -temporary show it -afterward remove comment
            //$("#MSubmit_matchRule").hide(); 

            //in Import Match Grid on click of child checkbox
            $("input[type='checkbox'][offval='no']", "#dtgridManual").live("click", function (elm) {
                //debugger;
                MasterChkClick(elm);
            });  //your code 


            //import radio change function
            $("input[name='radiogrp_imp']").change(function () {
                disableControls();
            });


            $("#MSubmit_ImportRel").click(function () {
                //debugger;
                ImportDataRel(); // ApplyRule();
            });

            ////////////////////////////////////////Dimension-Import///////////////////////////////////////////////////////////
            //end of tab master scripts


            //configuration tab 

            //dimension tab
            /////debugger;
            $("#CSubmit_CrTable").hide();

            //show button click of dimension
            $("#CSubmit_Show").click(function () {
                loadConfigDimColdata();
            });

            //Create button click of dimension
            $("#CSubmit_CrTable").click(function () {
                CreateDimConfigTable();
            });

            //Reverse Engineering button click of dimension
            $("#CSubmit_RevEng").click(function () {
                ReverseEngConfigTable();
            });


            //hide relation div 
            $("#tabsRel").hide();
            //end of dimension tab

            //start of user tab
            //show button click of user
            $("#USubmit_Show").click(function () {
                loadConfigUserdata();
            });
            //end of user tab


            //end of configuration tab

            //Report tab
            //submit button click
            dim_data = BindCombo("bind_master", "", "drp_dimesion", "master", true);

            $("#SSubmit").click(function () {
                //debugger;               
                showData();
            });

            //dimension change event
            $("#drp_dimesion").change(function () {
                // debugger;
                dimtable_name = $("#drp_dimesion option:selected").data("TableName");
                list_id = $("#drp_dimesion").val();
                loadGridRptdata(dimtable_name, list_id);
            });

            // $('#radiogrp_Src').change(function () {
            $("input[name='radiogrp_Src']").change(function () {
                // debugger;
                if ($(this).val() == 'SM' || $(this).val() == 'S') {
                    $('#chkSrc').show();
                }
                else {
                    $('#chkSrc').hide();
                }
                // alert('Handler for .change() called.');

                //if($(this)
            });

            //start of relation (master) scripts
            ////////////////////////////////////////Dimension-Relation///////////////////////////////////////////////////////////
            //on load show the firs master idv
            //fillRelatioDiv();

            //onclick on document hide menu
            $(document).click(function () {
                $("#del-menu").hide();
            });

            $("#del-menu").click(function (action, el, pos) {
                menuClick(action);
            });

            ////////////////////////////////////////Dimension-Relation///////////////////////////////////////////////////////////
            //end of relation (master) scripts
        });

    </script>
    <script type="text/javascript">
        //        jsPlumb.ready(function () {
        //            //debugger;
        //            document.onselectstart = function () { return false; };
        //        });
    </script>

    <%-- <script>        $(document).bind('mousemove', function (e) {
            $("#container_0").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY);
        }); </script>--%>

    <script type="text/javascript">

        function getTabs() {
            // //debugger;
            var $tabs = $('#tabsDim').tabs();
            var len = $('#tabsDim').tabs('length');

            //remove tabs except attribute tab
            for (var i = $('#tabsDim').tabs('length') - 1; i > 0; i--) {
                $('#tabsDim').tabs('remove', i);
            }

            tempNodeId = new Array();
            //            //select attribute tab
            $("#tabsDim").tabs("select", "#tabsDim-0");

            $.ajax({
                async: true,
                type: 'POST',
                url: "Callback.aspx?operation=get_dim&hier_id=" + $("#drp_hier").val(),
                success: function (str) {
                    debugger;

                    var data = eval('(' + str + ')');
                    //alert("h");
                    var i;
                    tempNodeId.length = data.length + 1;

                    for (i = 0; i < data.length; i++) {
                        // //debugger;
                        AddTabs(data[i].dimname, data[i].dimabbr, data[i], i);
                    }
                }
            });
        }


        //add dimension tabs dynamically
        function AddTabs(tabname, tababbr, tab, index) {

            //debugger;
            //alert(tababbr);
            $("#tabsDim").tabs("add", "#" + tababbr, tabname);

            // var strDim = '<table id="dtgrid' + tabname + '" class="scroll" cellpadding="0" cellspacing="0"> </table>';
            // strDim = strDim + '<div id="pg' + tabname + '" class="scroll" style="text-align: center;"></div>';

            $("#tmplDynTabs").tmpl(tab).appendTo("#" + tababbr);
            $("#" + tababbr).tabs();

            //css of dimension tab (to make a class and apply)
            $("#" + tababbr).css("height", "370px");
            $("#" + tababbr).css("border", "1px solid #A6C9E2");
            $("#" + tababbr).css("margin", "5px");
            $("#" + tababbr).css("padding", "0px");
            //to fill un-assigned data
            //loadGriddataDim(tababbr, '', index, "unassign");
        }

        //end of adding dimensions
        $(function () {

            var $tabs = $("#tabsDim").tabs({
                select: function (e, ui) {
                    ////debugger;
                    var node_id = $("#demo").jstree('get_selected').attr("id");

                    if (ui.index != 0) {
                        var dimtabName = ui.panel.id;
                        //var node_id = $("#demo").jstree('get_selected').attr("id");
                        if (node_id == undefined) { node_id = 0; }
                        //ui.panel.id
                        //
                        //debugger;
                        //hide "add rel" & "remove relation" button 
                        //depending on if it is leaf node
                        if ($("#demo").jstree('get_selected').attr("isleaf") == "1") {
                            $('input[id=btn' + dimtabName + '_arel]').show();
                            $('input[id=btn' + dimtabName + '_rrel]').show();
                        }
                        else {
                            $('input[id=btn' + dimtabName + '_arel]').hide();
                            $('input[id=btn' + dimtabName + '_rrel]').hide();
                        }

                        ////debugger;
                        //disable "rule tab"
                        //depending on if it is root node
                        if ($("#demo").jstree('get_selected').attr("id") == "1" || $("#demo").jstree('get_selected').attr("validparent") == "") {
                            //$('input[id=btn' + dimtabName + '_rule]').hide();
                            $("#" + dimtabName).tabs('select', 0);
                            $("#" + dimtabName).tabs({ disabled: [1] });
                        }
                        else {
                            // $("#" + dimtabName).tabs({ enabled: [1] });
                            $("#" + dimtabName).tabs('enable', 1);
                            //.tabs('enable',1)  
                        }

                        if (tempNodeId[ui.index] != node_id) {
                            //$("#tab" + thistab).html(getGridData(dimtabName));
                            loadGriddataDim(dimtabName, node_id, ui.index, "exist", "true");
                            //tempNodeId[ui.index] = node_id;
                        }

                    }
                    else {
                        if (node_id != undefined) {
                            getAttr();
                        }
                    }
                }
            });
        });

    </script>

    <script type="text/javascript">

        $(function () {
            // debugger;

            var $tabs = $("#tabs").tabs({
                select: function (e, ui) {
                    //debugger;
                    if (ui.index == 4) {
                        ////debugger;
                        var dimtabName = ui.panel.id;
                        if ($("#gbox_dtXMasterList").length == 0) {
                            loadConfigDimdata();
                        }
                    }
                }
            });
        });

        //on click of configuratin
        $(function () {
            var $tabs = $("#tabsCon").tabs({
                select: function (e, ui) {
                    ////debugger;          
                    if (ui.index == 4) {
                        //var dimtabName = ui.panel.id;
                        //alert(dimtabName);
                        if ($("#gbox_dtMUserType").length == 0) {
                            loadConfigUserTypedata();
                        }
                    }
                }
            });
        });


        //on click of dimension Match tab
        $(function () {
            var $tabs = $("#tabsDimm").tabs({
                cache: true,
                select: function (e, ui) {
                    //debugger;
                    if (ui.index == 1 && $('#drp_mstM option').size() == 0) {
                        //alert(dimtabName);
                        //if ($('#drp_mstM option').size() == 0) {
                        //debugger;
                        var mst_data = BindCombo("bind_master", "", "drp_mstM", "master", true);
                        //fill existing processes of import grid
                        fillExistProcGrid();
                        //}                    
                    }
                    //if relation import tab is clicked
                    //first time append controls
                    else if (ui.index == 2 && $('#drp_mstRel option').size() == 0) {
                        //debugger;
                        //clone master dropdown to rel dropdown
                        $('#drp_mst option').clone().appendTo('#drp_mstRel');
                        $('#drp_mst option').clone().appendTo('#drp_chldRel');

                    }
                    //                    else if (ui.index == 1 && $('#container_0').children().length == 0) {
                    //                        //debugger;
                    //                        fillRelatioDiv();
                    //                    }
                }
            });
        });

//        ///check this
//        //on click of relation tab( master)
//        $(function () {
//            var $tabs = $("#tabsCon").tabs({
//                select: function (e, ui) {
//                    ////debugger;          
//                    if (ui.index == 4) {
//                        //var dimtabName = ui.panel.id;
//                        //alert(dimtabName);
//                        if ($("#gbox_dtMUserType").length == 0) {
//                            loadConfigUserTypedata();
//                        }
//                    }
//                }
//            });
//        });
    </script>
</head>
<body style="cursor: auto;">
    <form id="form1" runat="server">
    <%--for tab--%>
    <script>
        //for tab main
        $(function () {
            $("#tabs").tabs();
        });

        //for tab inside hierarchy tab
        $(function () {
            $("#tabsDim").tabs();
        });

        //for tab inside configuration tab
        $(function () {
            $("#tabsCon").tabs();
        });

        //for tab inside Report tab
        $(function () {
            $("#tabsRep").tabs({ closable: true });
        });

        //for tab inside Dimension tab
        $(function () {
            $("#tabsDimm").tabs();
        });

        //        //tabsRel
        //        //for tab inside Relation tab
        //        $(function () {
        //            $("#tabsRel").tabs({ closable: true });
        //        });

    </script>
    <div align="center" style="width: 99%; margin-right: auto; margin-left: auto; float: none;">
        <div style="height: 50px; background-color: #C5DBEC; text-align: center; border: 1px solid;
            vertical-align: middle;">
            <div>
                <span style="font-style: normal; font-size: 20px; color: #2D2D2D; text-align: center;
                    margin-left: 10px; vertical-align: middle; height: 50px;">Dynamic Dimensions – By
                    ExpertDimensions – Jump to Business Intelligence 3.0</span></div>
            <div align="right" style="vertical-align: top; padding-right: 2px; margin-top: 10px;">
                <a href='logout.aspx'><b>Logout</b></a><%--<a href="javascript:void(0);" onclick="PopupCenter('http://www.nigraphic.com', 'myPop1',900,520);">CLICK TO OPEN POPUP</a>--%></div>
        </div>
        <div id="tabs" style="overflow: auto;">
            <ul>
                <li><a href="#tabs-0">Dashboard</a></li>
                <li><a href="#tabs-1">Dimensions</a></li>
                <li><a href="#tabs-2">Grouping</a></li>
                <li><a href="#tabs-4">Reporting</a></li>
                <li><a href="#tabs-3">Configuration</a></li>
            </ul>
            <%--Dash Board--%>
            <div id="tabs-0">
                <%--  <div align="center" style="margin-left: 0px; margin-top: 10px;">
                    <span style="width: 25px; text-align: left;"><b>Select Dimension :</b></span>
                    <select style="width: 140px;" id="drp_mstdash" name="drp_mstdash">
                    </select>&nbsp;&nbsp; <span><b>Chart Type</b></span><input type="radio" name="radiogrp_chart"
                        value="pie" checked /><span>Pie</span>
                    <input type="radio" name="radiogrp_chart" value="bar" /><span>Bar</span>&nbsp;&nbsp;
                    <span><b>Select Field</b></span><input type="radio" name="radiogrp_chfield" value="city"
                        checked /><span>City</span>
                    <input type="radio" name="radiogrp_chfield" value="state" /><span>State</span>
                   
                    <div align="center" id="chartdiv" style="height: 450px; width: 700px; margin-top: 15px;">
                    </div>
                </div>--%>
                <div class="box_dimension">
                    <ul>
                        <li class="title">Select Dimension :</li>
                        <li class="margin_right">
                            <select style="width: 140px;" id="drp_mstdash" name="drp_mstdash">
                                <%--  <option value="">--Select--</option>
                                <option value="4">Account</option>
                                <option value="5">Contact</option>--%>
                            </select></li><li class="border_right margin_right"></li>
                        <li class="title">Chart Type</li>
                        <li>
                            <input type="radio" name="radiogrp_chart" value="pie" checked></li><li class="sub_title">
                                Pie</li>
                        <li>
                            <input type="radio" name="radiogrp_chart" value="bar"></li><li class="sub_title margin_right">
                                Bar</li>
                        <li class="border_right margin_right"></li>
                        <li class="title">Select Field</li>
                        <li>
                            <input type="radio" name="radiogrp_chfield" value="city" checked></li>
                        <li class="sub_title">City</li>
                        <li>
                            <input type="radio" name="radiogrp_chfield" value="state"></li><li class="sub_title">
                                State</li>
                    </ul>
                </div>
                <div id="chartdiv" style="height: 435px; width: 700px; margin-top: 5px;">
                </div>
            </div>
            <%--Dash Board--%>
            <%--for Master--%>
            <div id="tabs-1">
                <div id="tabsDimm">
                    <ul style="text-align: right;">
                        <li><a href="#tabsDimm-0">Dimensions</a></li>
                        <%-- <li><a href="#tabsDimm-1">Relation </a></li>--%>
                        <li><a href="#tabsDimm-1">Import </a></li>
                        <li><a href="#tabsDimm-2">Import Relation</a></li>
                        <li style="float: right;"><a id="tabsDimmCaption"></a></li>
                    </ul>
                    <div id="tabsDimm-0" style="overflow: auto;">
                        <div class="box_dimension">
                            <ul>
                                <li class="title">Master</li>
                                <li>
                                    <select style="width: 140px;" id="drp_mst" name="drp_mst">
                                    </select></li>
                                <li>
                                    <input id="MSubmit_M" type="button" value="Submit" class="submit-button" style="height: 24px" /></li>
                            </ul>
                        </div>
                        <div style="margin-top: 10px;" align="center">
                            <table id="dataGrid" class="scroll" cellpadding="0" cellspacing="0">
                            </table>
                            <div id="pager" class="scroll">
                            </div>
                            <br />
                            <div align="right" style="width: 920px;">
                                <input id="MSubmit_Rel" type="button" style="height: 24px; margin: 5px auto;" value="Show Relation Data"
                                    class="submit-button" />&nbsp;
                                <input id="MSubmit_Show" type="button" style="height: 24px; margin: 5px auto;" value="Edit Source"
                                    class="submit-button" />
                            </div>
                            <div id="relMstError" class="msgError" style="height: 10px; text-align: center; margin-left: 10px;">
                                No related master is there !
                            </div>
                            <div id="editSrcError" class="msgError" style="height: 10px; text-align: center;
                                margin-left: 10px;">
                                Please Select single dimension for Edit Source !
                            </div>
                            <div id="divRel" style="display: none">
                                <table id="datagridRel" class="scroll" cellpadding="0" cellspacing="0">
                                </table>
                                <div id="pagerRel" class="scroll">
                                </div>
                            </div>
                            <div id="tabsRel">
                                <%--style="overflow: auto;"--%>
                                <ul id="ulRel">
                                    <li style="height: 27px;"><a href="#tabsRel-0"><span>Relation Grpah</span></a></li>
                                </ul>
                                <div id="tabsRel-0" style="text-align: left; overflow: auto;">
                                    <%--style="overflow: auto;--%>
                                    <div id="rel-frame">
                                        <div id="relError" class="msgError" style="height: 20px;">
                                        </div>
                                        <div id="container_0" style="float: left;">
                                        </div>
                                        <%--   <div style="border: 1px solid #BDBDBD; padding: 10px; display: none; position: absolute;
                                            background-color: rgb(238, 238, 238); font-weight: bold;" id="del-menu" class=".ui-widget ">
                                            <a href="#" id="aDetail" style="list-style-type: none; text-decoration: none; margin-top: 10px;"
                                                class="context-menu-item">Detail</a><br />
                                            <div class="context-menu-separator">
                                                &nbsp;
                                            </div>
                                            <a href="#" id="aRemove" style="list-style-type: none; margin-top: 10px; text-decoration: none;"
                                                class="context-menu-item">Remove</a><br />
                                        </div>--%>
                                    </div>
                                </div>
                            </div>
                            <table width="100%">
                                <tr>
                                    <td align="center">
                                        <table id="M_DimMast" style="border-left: 1px solid #2E6E9E; border-top: 1px solid #2E6E9E;">
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <div style="width: 920px;">
                                <div style="float: right;">
                                    <input id="MSubmit_Apply" class="submit-button" type="button" style="height: 24px;
                                        margin: 5px auto;" value="Save" />
                                </div>
                            </div>
                            <div id="divDetail">
                            </div>
                        </div>
                    </div>
                    <%--relation tab--%>
                    <%--<div id="tabsDimm-1" style="overflow: auto; text-align: left;">
                        <div id="tabsRel" style="overflow: auto;">
                            <ul style="text-align: right;">
                                <li><a href="#tabsRel-0">Relation Grpah</a></li>
                            </ul>
                            <div id="tabsRel-0" style="overflow: auto; text-align: left;">
                                <div id="rel-frame">
                                    <div id="container_0" style="float: left;">
                                    </div>
                                    <div style="border: 1px solid #BDBDBD; padding: 10px; display: none; position: absolute;
                                        background-color: rgb(238, 238, 238); font-weight: bold;" id="del-menu" class=".ui-widget ">
                                        <a href="#" id="aDetail" style="list-style-type: none;text-decoration:none; margin-top: 10px;" class="context-menu-item">
                                            Detail</a><br />
                                        <div class="context-menu-separator">&nbsp;
                                        </div>
                                        <a href="#" id="aRemove" style="list-style-type: none; margin-top: 10px;text-decoration:none; " class="context-menu-item">
                                            Remove</a><br />                                      
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>--%>
                    <%--end of relation tab--%>
                    <div id="tabsDimm-1" style="overflow: auto; height: 410px; text-align: left;">
                        <div style="text-align: left;">
                            <span class="title">Master</span>
                            <select style="width: 140px;" id="drp_mstM" name="drp_mstM">
                            </select>
                        </div>
                        <input type="radio" name="radiogrp_imp" value="exist" style="margin-top: 15px;" checked>
                        <span class="title">Existing </span>
                        <div id="div_exist" style="margin-left: 20px; margin-top: 5px; overflow-y: auto;">
                            <table id="dtgridExist" class="scroll" cellpadding="0" cellspacing="0">
                            </table>
                            <div id="pgExist" class="scroll">
                            </div>
                        </div>
                        <input type="radio" name="radiogrp_imp" value="new" style="margin-top: 15px;">
                        <span class="title">new </span>
                        <div id="div_new" style="margin-left: 20px; margin-top: 5px;">
                            <iframe src="Import.aspx" style="border: 0px; height: 30px; width: 100%" id="frameFile"
                                bordercolor="white" frameborder="0"></iframe>
                            <span>Excel Sheet Name : </span>
                            <input type="text" id="txtExcel" style="width: 140px;" />
                            <span>Uploaded File : </span>
                            <input type="text" id="txtUpload" style="width: 140px;" readonly="readonly" />
                            <input type="hidden" id="hid_ImpId" />
                            <input id="MSubmit_Import" type="button" value="Import Data" class="submit-button"
                                style="height: 24px" />
                        </div>
                        <%-- <panel>
                         <span class="title">Master</span>
                         <select style="width: 140px;" id="Select1" name="Select1">
                            </select>
                        </panel>--%>
                        <%--<span><b>Uploaded File : </b></span><span id="uploaded_file"></span>--%>
                        <div style="margin-top: 15px; margin-left: 20px;">
                            <table id="dtImport" cellpadding="0" cellspacing="0">
                            </table>
                            <div id="pgImport" class="scroll">
                            </div>
                        </div>
                        <div align="left">
                            <input id="MSubmit_matchRule" type="button" value="Execute Rule" class="submit-button"
                                style="height: 24px; margin-top: 10px; margin-left: 20px;" />
                        </div>
                    </div>
                    <div id="tabsDimm-2" style="overflow: auto; height: 410px; text-align: left;">
                        <div style="text-align: left;">
                            <span class="title">Master</span>
                            <select style="width: 140px;" id="drp_mstRel" name="drp_mstRel">
                            </select>
                        </div>
                        <div style="text-align: left; margin-top: 5px; margin-bottom: 5px;">
                            <span class="title">Child&nbsp;&nbsp;&nbsp;&nbsp;</span>
                            <select style="width: 140px;" id="drp_chldRel" name="drp_chldRel">
                            </select>
                        </div>
                        <iframe src="ImportRel.aspx" style="border: 0px; height: 30px; width: 100%" id="frameFileRel"
                            bordercolor="white" frameborder="0"></iframe>
                        <span>Excel Sheet Name : </span>
                        <input type="text" id="txtExcelRel" style="width: 140px;" />
                        <span>Uploaded File : </span>
                        <input type="text" id="txtUploadRel" style="width: 140px;" readonly="readonly" />
                        <input id="MSubmit_ImportRel" type="button" value="Import Data" class="submit-button"
                            style="height: 24px" />
                    </div>
                </div>
                <br />
            </div>
            <%--End of Master--%>
            <%--for hierarchy--%>
            <div id="tabs-2" align="center">
                <%--                <div style="text-align: left;" class="box_dimension">
                    <ul>
                        <li><span>Hierarchy:</span></li>
                        <li>
                            <select style="width: 140px;" id="drp_hier" name="drp_hier">
                            </select><span>Version :</span></li>
                        <li>
                            <select style="width: 140px;" id="drp_ver" name="drp_ver">
                            </select></li>
                        <li>
                            <input type="radio" name="sdate" value="todate" id="todate" onclick="disabledate();" />
                            <label for="todate">
                                As of Today</label></li>
                        <li>
                            <input type="radio" name="sdate" value="histdate" id="histdate" onclick="disabledate();" />
                            <label for="histdate">
                                Historical View</label></li>                        
                        <li>
                            <input type="text" style="width: 70px;" id="txt_date" name="txt_date" readonly="readonly" />(MM/dd/yyyy
                            )</li>
                        <li>
                            <input id="submit" type="button" style="height: 24px;" class="submit-button" value="submit" /></li>
                        <li>
                            <input type="button" style="height: 24px;" class="submit-button" value="refresh"
                                onclick="$('#demo').jstree('refresh',-1);" /></li>
                    </ul>
                </div>--%>
                <div style="text-align: left;" class="box_dimension">
                    <ul>
                        <li class="title">Hierarchy:</li>
                        <li>
                            <select id="drp_hier" style="width: 140px;" name="drp_hier">
                            </select></li>
                        <li class="title">Version :</li>
                        <li>
                            <select id="drp_ver" name="drp_ver" style="width: 140px;">
                            </select></li>
                        <li>
                            <input type="radio" name="sdate" value="todate" id="todate" onclick="disabledate();" />
                            <label for="todate" class="sub_title">
                                As of Today</label></li>
                        <li>
                            <input type="radio" name="sdate" value="histdate" id="histdate" onclick="disabledate();" />
                            <label for="histdate" class="sub_title">
                                Historical View</label></li>
                        <li class="border_right margin_right">&nbsp;</li>
                        <li>
                            <input type="text" style="width: 80px; margin-right: 5px;" id="txt_date" name="txt_date"
                                readonly="readonly" title="mm/dd/yyyy" /><%--<font style="font-size: smaller">&nbsp; &nbsp;(mm/dd/yyyy )</font>--%></li>
                        <li>
                            <input id="submit" type="button" style="height: 24px; margin-right: 3px; margin-left: 10px;
                                width: 70px;" class="submit-button" value="Submit" /></li>
                        <li>
                            <input type="button" style="height: 24px; width: 70px;" class="submit-button" value="Refresh"
                                onclick="$('#demo').jstree('refresh',-1);" /></li>
                    </ul>
                </div>
                <div id="divNodeList" style="display: none; visibility: hidden; top: 194px; left: 37px;"
                    class="jstree-default-context">
                    <ul id="nodelist" class="sf-menu">
                    </ul>
                </div>
                <!-- the tree container (notice NOT an UL node) -->
                <div style="height: 0px; text-align: center;">
                    <input type="button" style='width: 170px; height: 24px; margin: 5px auto; display: none'
                        value="reconstruct" onclick="$.get('Callback.aspx?reconstruct', function () { $('#demo').jstree('refresh',-1); });" />
                    <input type="button" style='width: 170px; height: 24px; margin: 5px auto; display: none'
                        id="analyze" value="analyze" onclick="$('#alog').load('Callback.aspx?analyze');" />
                    <%--<input type="button" style='width: 170px; height: 24px; margin: 5px auto;' value="refresh"
                onclick="$('#demo').jstree('refresh',-1);" />--%>
                </div>
                <div align="left" style="margin-top: 5px;">
                    <table style="margin-left: 0px; border: 0px solid red;" width="100%">
                        <tr>
                            <td align="left" width="35%" style="border: 0px solid blue;">
                                <div id="demo" class="demo ui-widget-content ui-corner-all" style="height: 422px;
                                    vertical-align: middle; padding: 0px; margin: 0px;">
                                </div>
                            </td>
                            <td align="left" width="65%" valign="top" style="border: 0px solid yellow;">
                                <div id="tabsDim" style="height: 423px; padding: 0px; margin: 0px;">
                                    <ul id="dimensions">
                                        <li><a href="#tabsDim-0">Attributes</a></li>
                                    </ul>
                                    <div id="tabsDim-0" style="margin-top: 5%;" align="center">
                                        <table id="NodeAttr" class="group_table" width="80%" align="center" cellpadding="0"
                                            cellspacing="0" border="0">
                                        </table>
                                        <table id="tbl_Buttons" width="80%" cellpadding="0" class="group_table" style="margin-top: 10px;"
                                            cellspacing="0" border="0">
                                            <tr>
                                                <td align="right">
                                                    <input type="button" style="height: 24px;" value="Save" id="btn_Save" class="submit-button" />
                                                    <input type="button" style="height: 24px;" value="Cancel" class="submit-button" id="btn_Cancel" />
                                                </td>
                                            </tr>
                                        </table>
                                        <%--  <table style="width: 90%" class="group_table">
                                            <tr>
                                                <td>
                                                    <table id="NodeAttr" width="90%" align="center" cellpadding="0" cellspacing="0" border="0">
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <table id="tbl_Buttons" cellpadding="0" cellspacing="0" border="0" style="display: none;">
                                                        <tr>
                                                            <td>
                                                                <input type="button" value="Save" id="btn_Save" />
                                                                <input type="button" value="Cancel" id="btn_Cancel" />
                                                            </td>                                                            
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>--%>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <%--end of hierarchy--%>
            <%--Reports--%>
            <div id="tabs-4" align="left">
                <div id="tabsRep">
                    <ul id="Ul1">
                        <li><a href="#tabsRep-0">Search</a></li>
                    </ul>
                    <div id="tabsRep-0" style="height: 425px;overflow-y:auto;">
                        <table id="tblReport" class="report_table" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <span style="width: 25px; text-align: left;">Dimesion</span>
                                </td>
                                <td>
                                    <select style="width: 140px;" id="drp_dimesion" name="drp_dimesion">
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    CRM
                                </td>
                                <td>
                                    <input type="radio" name="radiogrp_crm" value="CRM > 0" class="rptInput" checked /><span>Exists</span>
                                    <input type="radio" name="radiogrp_crm" value="CRM = 0" class="rptInput" /><span>Does
                                        Not Exist</span>
                                    <input type="radio" name="radiogrp_crm" value="" class="rptInput" /><span>Don't Care</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    ERP
                                </td>
                                <td>
                                    <input type="radio" name="radiogrp_erp" value="ERP > 0" class="rptInput" checked /><span>Exists</span>
                                    <input type="radio" name="radiogrp_erp" value="ERP = 0" class="rptInput" /><span>Does
                                        Not Exist</span>
                                    <input type="radio" name="radiogrp_erp" value="" class="rptInput" /><span>Don't Care</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    WEB
                                </td>
                                <td>
                                    <input type="radio" name="radiogrp_web" value="WEB > 0" class="rptInput" checked /><span>Exists</span>
                                    <input type="radio" name="radiogrp_web" value="WEB = 0" class="rptInput" /><span>Does
                                        Not Exist</span>
                                    <input type="radio" name="radiogrp_web" value="" class="rptInput" /><span>Don't Care</span>
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    <%-- <div style="overflow-y: scroll;height:250px;">--%>
                                    <table id="dataGridRpt" cellpadding="0" cellspacing="0">
                                    </table>
                                    <div id="pagerRpt" class="scroll">
                                    </div>
                                    <%--</div>--%>
                                </td>
                            </tr>
                        </table>
                        <table cellpadding="0" cellspacing="0" border="0">
                            <%--<tr>
                                <td>
                                    Select Columns
                                </td>
                                <td>
                                </td>
                            </tr>--%>
                            <%-- <tr>
                                <td>
                                    <input type="checkbox" name="chk_all" value="chk_all" checked /><span> Select All</span>
                                </td>
                                <td>
                                </td>
                            </tr>--%>
                            <tr>
                                <td colspan="2" id="chkCol">
                                </td>
                            </tr>
                            <tr style="display: none;">
                                <td colspan="2">
                                    <div>
                                        Output Of Source
                                    </div>
                                </td>
                            </tr>
                            <tr style="display: none;">
                                <td colspan="2">
                                    <input type="radio" name="radiogrp_Src" value="SM" checked /><span>Source And Master</span>
                                    <input type="radio" name="radiogrp_Src" value="M" /><span>Only Master</span>
                                    <input type="radio" name="radiogrp_Src" value="S" /><span>Only Source</span>
                                    <%--    <input type="radio" name="radiogrp_Src" id="input_SM" checked /><span>Source And Master</span>
                            <input type="radio" name="radiogrp_Src" id="input_M"/><span>Only Master</span>
                            <input type="radio" name="radiogrp_Src" id="input_S"/><span>Only Source</span>--%>
                                </td>
                            </tr>
                            <tr style="display: none;">
                                <td colspan="2" id="chkSrc">
                                    <input type="checkbox" name="chkgrp_src" value="CRM" checked /><span>CRM</span>
                                    <input type="checkbox" name="chkgrp_src" value="ERP" /><span>ERP</span>
                                    <input type="checkbox" name="chkgrp_src" value="WEB" /><span>WEB</span>
                                </td>
                            </tr>
                            <%-- <tr>
                        <td colspan="2" id="td_Src">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table id="listRpt">
                            </table>
                            <div id="pagerRpt">
                                Report Data</div>
                        </td>
                    </tr>--%>
                            <%--  <tr>
                                <td>                                   
                                    <input type="button" id="SSubmit" value="Show Data" />
                                </td>
                                <td>
                                </td>
                            </tr>--%>
                            <%--   <tr>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>--%>
                            <%-- <tr>
                                <td colspan="2">
                                    <table id="dataGridRptData" class="scroll" cellpadding="0" cellspacing="0">
                                    </table>
                                    <div id="pagerRptData" class="scroll">
                                    </div>
                                </td>
                            </tr>--%>
                            <tr style="margin-top: 60; display: none;">
                                <td>
                                    <span>Export Format</span>
                                </td>
                                <td>
                                    <select style="width: 140px;" id="drp_ExportFormats" name="drp_ExportFormats">
                                        <option value="Excel" selected="selected">Excel</option>
                                        <option value="PDF">PDF</option>
                                        <option value="HTML">HTML</option>
                                    </select>
                                    <input type="button" id="RSubmit" value="Export" />
                                </td>
                            </tr>
                        </table>
                        <div align="left">
                            <input type="button" id="SSubmit" value="Show Data" class="submit-button" style="margin-top: 20px" />
                        </div>
                    </div>
                </div>
            </div>
            <%--end of Reports--%>
            <%--Configuration--%>
            <div id="tabs-3">
                <div id="tabsCon">
                    <ul id="config">
                        <li><a href="#tabsCon-0">Dimensions</a></li>
                        <li><a href="#tabsCon-1">Hierarchies</a></li>
                        <li><a href="#tabsCon-2">Relationships</a></li>
                        <li><a href="#tabsCon-3">Dashboard</a></li>
                        <li><a href="#tabsCon-4">Users</a></li>
                    </ul>

                    <div id="tabsCon-0" style="overflow: auto; height: 425px;">
                        <div align="right" style="width: 900px;">
                            <input class="submit-button" id="CSubmit_RevEng" type="button" style="height: 24px;"
                                value="Reverse Engineering" />
                        </div>
                        <br />
                        <%-- <table>
                            <tr>
                                <td>
                                    <input id="CSubmit_RevEng" type="button" style="height: 24px;" value="Reverse Engineering" />
                                </td>
                            </tr>
                        </table>
                        <br />--%>
                        <table id="dtXMasterList" class="scroll" cellpadding="0" cellspacing="0">
                        </table>
                        <div id="pgXMasterList" class="scroll">
                        </div>
                        <div align="right" style="width: 900px; padding-top: 1.4em; padding-bottom: 1.4em;">
                            <input type="button" class="submit-button" value="Show" style="height: 24px;" id="CSubmit_Show">&nbsp;<br>
                        </div>
                        <table>
                            <%-- <tr>
                                <td>
                                    <input id="CSubmit_Show" type="button" style="height: 24px; margin: 5px auto;" value="Show" />&nbsp;<br />
                                </td>
                            </tr>--%>
                            <tr>
                                <td>
                                    <table id="dtXMasterListCol" class="scroll" cellpadding="0" cellspacing="0">
                                    </table>
                                    <div id="pgXMasterListCol" class="scroll">
                                    </div>
                                    <input id="hidListCol" name="hidListCol" type="hidden" value="" />
                                    <input id="hidList" name="hidList" type="hidden" value="" />
                                </td>
                            </tr>
                            <%--<tr>
                                <td>
                                    <input id="CSubmit_CrTable" type="button" style="height: 24px;" value="Create Table" />&nbsp;&nbsp;
                                </td>
                            </tr>--%>
                        </table>
                        <div align="right" style="padding-top: 1.4em; padding-bottom: 1.4em;">
                            <input id="CSubmit_CrTable" type="button" style="height: 24px;" value="Create Table"
                                class="submit-button" />
                        </div>
                    </div>

                    <div id="tabsCon-1" style="height: 425px;">


                    </div>

                    <div id="tabsCon-2" style="height: 425px;">
                    </div>

                    <div id="tabsCon-3" style="height: 425px;">
                    </div>

                    <div id="tabsCon-4" style="height: 425px;">
                        <br />
                        <table id="dtMUserType" class="scroll" cellpadding="0" cellspacing="0">
                        </table>
                        <div id="pgMUserType" class="scroll">
                        </div>
                        <div align="right" style="width: 900px;">
                            <input id="USubmit_Show" type="button" style="height: 24px; margin: 5px auto;" value="Show"
                                class="submit-button" />&nbsp;<br />
                        </div>
                        <table>
                            <%--  <tr>
                                <td>
                                    <input id="USubmit_Show" type="button" style="height: 24px; margin: 5px auto;" value="Show" />&nbsp;<br />
                                </td>
                            </tr>--%>
                            <tr>
                                <td>
                                    <table id="dtMUser" class="scroll" cellpadding="0" cellspacing="0">
                                    </table>
                                    <div id="pgMUser" class="scroll">
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <%--Configuration--%>
        </div>
    </div>
    </form>
    <div style="border: 1px solid #BDBDBD; padding: 10px; display: none; position: absolute;
        background-color: rgb(238, 238, 238); font-weight: bold;" id="del-menu" class=".ui-widget ">
        <a href="#" id="aDetail" style="list-style-type: none; text-decoration: none; margin-top: 10px;"
            class="context-menu-item">Detail</a><br />
        <div class="context-menu-separator">
            &nbsp;
        </div>
        <a href="#" id="aRemove" style="list-style-type: none; margin-top: 10px; text-decoration: none;"
            class="context-menu-item">Remove</a><br />
    </div>
</body>
</html>
